package com.yalemang.photovalut.ui.preview.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.yalemang.photovalut.ui.preview.page.PreviewPhotoFragment

class PreviewFragmentAdapter(
    fragmentActivity: FragmentActivity,
    private var photoPaths: ArrayList<String>
) : FragmentStateAdapter(fragmentActivity) {

    override fun getItemCount(): Int {
        return photoPaths.size
    }

    override fun createFragment(position: Int): Fragment {
        return PreviewPhotoFragment.newInstance(photoPaths.elementAt(position))
    }
}